package com.test.utils;


public class ResponseApi<T> {


    public <T> Response<T> setSuccess(Integer statusCode,String statusMessage,T data){
        return new Response<T>(statusCode,statusMessage,data);
    }
    public <T> Response<T> setSuccess(){
        return new Response<T>(ReturnResult.SUCCESS.getStatusCode(),ReturnResult.SUCCESS.getStatusMessage(),null);
    }
    public <T> Response<T> setSuccess(T data){
        return new Response<T>(ReturnResult.SUCCESS.getStatusCode(),ReturnResult.SUCCESS.getStatusMessage(),data);
    }


    public <T> Response<T> setError(Integer statusCode,String statusMessage,T data){
        return new Response<T>(statusCode,statusMessage,data);
    }
    public <T> Response<T> setError(){
        return new Response<T>(ReturnResult.ERROR.getStatusCode(),ReturnResult.ERROR.getStatusMessage(),null);
    }
    public <T> Response<T> setError(T data){
        return new Response<T>(ReturnResult.ERROR.getStatusCode(),ReturnResult.ERROR.getStatusMessage(),data);
    }

    public <T> Response<T> setWait(Integer statusCode,String statusMessage,T data){
        return new Response<T>(statusCode,statusMessage,data);
    }
    public <T> Response<T> setWait(){
        return new Response<T>(ReturnResult.WAIT.getStatusCode(),ReturnResult.WAIT.getStatusMessage(),null);
    }
    public <T> Response<T> setWait(T data){
        return new Response<T>(ReturnResult.WAIT.getStatusCode(),ReturnResult.WAIT.getStatusMessage(),data);
    }



}
